package cn.xeblog.forward;

import cn.xeblog.forward.codec.SharedMessageCodec;
import cn.xeblog.forward.entity.Message;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;

/**
 * @author eleven
 * @date 2024/12/16 11:00
 * @apiNote
 */
public class ChannelTest {
    public static void main(String[] args) {
        LoggingHandler debugLogger = new LoggingHandler(LogLevel.DEBUG);
        SharedMessageCodec messageCodec = new SharedMessageCodec();
        EmbeddedChannel channel = new EmbeddedChannel(debugLogger, messageCodec, debugLogger);
        channel.writeOutbound(Message.heartbeat());
        channel.writeInbound(Message.heartbeat());
    }
}
